from wsgiref import headers

import requests

from com.yh.likeshop.api.user import User
from com.yh.likeshop.base.test_parent import TestParent
from com.yh.likeshop.utils.utils import like_host


class Cart(TestParent):

    #添加购物车接口
    def addCart(self,item_id,goods_num,token):
        user = User()
        cart={
            "item_id":item_id,
            "goods_num":goods_num
            }
        resp = requests.post(like_host+"/api/cart/add",json=cart,headers=token)
        return resp

    # def queryCart(self):
    #
    #
    # def updateCart(self):
    #
    #
    # def deleteCart(self):